<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>{% block title %}{{ application_name }} - {{ action }}{% endblock %}</title>
    {% block script %}{% endblock %}
    {% block style %}{% endblock %}
  </head>
  <body>
    <div id="header">
	<table width="100%">
	  <tr>
		<td width="80%">
		  <div class="action">{% block action %}{% endblock %}</div>
		</td>
		<td width="20%">
		  <div class="login">
		  {% if user %} 
		    <span class="item nickname">{{user.nickname }}</span> 
		    <span class="item"><a href="{{ logout_url|escape }}">Sign out</a></span>
		  {% else %} 
		    <span class="item"><a href="{{ login_url|escape }}">Sign in</a></span> 
		  {% endif %}
		  </div>
		</td>
	  </tr>
	</table>
    <hr />
    </div>
    <div id="body">{% block body %}{% endblock %}</div>
  </body>
</html>
